﻿@model Line20.DateTimeRangeField.Settings.DateTimeRangeFieldSettings
@using Line20.DateTimeRangeField.Settings;

<fieldset>
    <label for="@Html.FieldIdFor(m => m.Hint)">@T("Help text")</label>
    @Html.TextAreaFor(m => m.Hint, new { @class = "textMedium", rows = "5" } )
    <span class="hint">@T("The help text is written under the field when users are selecting an option.")</span>
    @Html.ValidationMessageFor(m => m.Hint)
</fieldset>
<fieldset>
    <div>
        @Html.CheckBoxFor(m => m.Required) <label for="@Html.FieldIdFor(m => m.Required)" class="forcheckbox">@T("An date time range is required")</label>
        <span class="hint">@T("Check to ensure the user is providing a value for this field.")</span>
    </div>
</fieldset>
<fieldset>
	<div class="editor-field">
        <label class="forpicker" for="@Html.FieldIdFor(m => m.Culture)">@T("Culture")</label>
        @Html.TextBoxFor(m => m.Culture, new { @class = "text"})
        @Html.ValidationMessageFor(m => m.Culture)
        <span class="hint">@T("The culture like 'nl', 'es', 'en'. Leave blank for the current culture of the webserver.")</span>
	</div>
</fieldset>
<fieldset>
    <label for="@Html.FieldIdFor(m => m.Display)" class="forcheckbox">@T("Display options")</label>  
    <select id="@Html.FieldIdFor(m => m.Display)" name="@Html.FieldNameFor(m => m.Display)">
        @Html.SelectOption(DateTimeRangeFieldDisplays.DateAndTime, Model.Display == DateTimeRangeFieldDisplays.DateAndTime, T("Date and time").ToString())
        @Html.SelectOption(DateTimeRangeFieldDisplays.DateOnly, Model.Display == DateTimeRangeFieldDisplays.DateOnly, T("Date only").ToString())
        @Html.SelectOption(DateTimeRangeFieldDisplays.TimeOnly, Model.Display == DateTimeRangeFieldDisplays.TimeOnly, T("Time only").ToString())
        @Html.SelectOption(DateTimeRangeFieldDisplays.SingleDateAndTime, Model.Display == DateTimeRangeFieldDisplays.SingleDateAndTime, T("Single Date and time").ToString())
    </select>
    <span class="hint">@T("Determines how you will use the date time range field.")</span>
</fieldset>
